package com.umeox.watch.moto.apiclient.model;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by Rambo 2020/5/25
 * Describe:
 */
public class VoipInviteResult implements Parcelable {

    public int code;

    public String msg;

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.code);
        dest.writeString(this.msg);
    }

    public VoipInviteResult() {
    }

    protected VoipInviteResult(Parcel in) {
        this.code = in.readInt();
        this.msg = in.readString();
    }

    public static final Creator<VoipInviteResult> CREATOR = new Creator<VoipInviteResult>() {
        @Override
        public VoipInviteResult createFromParcel(Parcel source) {
            return new VoipInviteResult(source);
        }

        @Override
        public VoipInviteResult[] newArray(int size) {
            return new VoipInviteResult[size];
        }
    };

    public static final class Builder {
        public int code;
        public String msg;

        private Builder() {
        }

        public static Builder aVoipInviteResult() {
            return new Builder();
        }

        public Builder setCode(int code) {
            this.code = code;
            return this;
        }

        public Builder setMsg(String msg) {
            this.msg = msg;
            return this;
        }

        public VoipInviteResult build() {
            VoipInviteResult voipInviteResult = new VoipInviteResult();
            voipInviteResult.msg = this.msg;
            voipInviteResult.code = this.code;
            return voipInviteResult;
        }
    }

    @Override
    public String toString() {
        return "VoipInviteResult{" +
                "code=" + code +
                ", msg='" + msg + '\'' +
                '}';
    }
}
